$(document).ready(function() {

	$("#dates").submit(function() {
		var d = parseInt($("#day").val());
		var m = parseInt($("#month").val());
		var y = parseInt($("#year").val());

		m = m - 1//January is 0 according to the documentation.

		var myDate = new Date();
		myDate.setFullYear(y, m, d);
		alert(myDate);

		var today = new Date();

		if (myDate == today) {
			$("#results").html("It's a bright day today");

		} else if (myDate < today) {
			$("#results").html("The date is in the past");
		} else if (myDate > today) {
			$("#results").html("The date is in the future");

		}
		return false;
	});
});
